import { createApp } from 'vue'
import App from '@/App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
const app = createApp(App)
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import 'virtual:svg-icons-register' // svg图标注册插件
// 引入自定插件对象，注册整个项目的全局组件
import globalComponent from '@/components'
// 引入全局样式
import '@/styles/index.scss'
// @ts-ignore
import zhCn from 'element-plus/dist/locale/zh-cn.min.mjs'
// 注册路由
import router from '@/router'
// 引入仓库
import pinia from '@/store'
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.use(ElementPlus, {
  locale: zhCn,
})
app.use(globalComponent)
app.use(router)
app.use(pinia)
app.mount('#app')
